package com.tempjob.admin.controller;

import com.tempjob.admin.security.annotation.AdminLogAnnotation;
import com.tempjob.common.businesss.mongo.entity.IndustryCategory;
import com.tempjob.common.businesss.service.MongoBeanUtil;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * 系统操作日志
 *
 * @version V1.0
 */
@RequestMapping("/common")
@Api(tags = "公共接口", value = "公共接口管理")
@RestController
@CrossOrigin(originPatterns = "*", methods = {RequestMethod.GET, RequestMethod.POST})
public class CommonController {

    @Autowired
    private MongoBeanUtil mongoBeanUtil;

    @PostMapping("addIndustry")
    @ApiOperation(value = "获取公司属性分类")
    @AdminLogAnnotation(title = "工作管理", action = "添加行业分类")
    public Object addIndustry(@RequestBody IndustryCategory dto) {
        return mongoBeanUtil.getIndustryCategoryService().save(dto);
    }


}
